
<template>
  <div class="twoStageWindow">
    <div class="twoStageWindowTitle">
      任务详情
      <!-- tab切换按钮 -->
      <div :class="{'tabName':true,'activeTab':nowTab=='basicInfo'}" v-on:click="nowTab='basicInfo'" >
        基础信息
      </div>
      <div :class="{'tabName':true,'activeTab':nowTab=='monitoringScheme'}" v-on:click="nowTab='monitoringScheme'" >
        监测方案
      </div>
      <div v-if="looksll" :class="{'tabName':true,'activeTab':nowTab=='jiancejieguo'}" v-on:click="nowTab='jiancejieguo'" >
        检测结果
      </div>
      <div v-if="looksll" :class="{'tabName':true,'activeTab':nowTab=='caiyangxinxi'}" v-on:click="nowTab='caiyangxinxi'" >
        样品信息
      </div>
      <div v-if="looksll" :class="{'tabName':true,'activeTab':nowTab=='shenghejilu'}" v-on:click="nowTab='shenghejilu'" >
        流程记录
      </div>
      <div :class="{'tabName':true,'activeTab':nowTab=='renwufujian'}" v-on:click="nowTab='renwufujian'" >
        任务附件
      </div>
      <div class="twoStageWindowClose"  >
        <el-button v-if="!canNotEdit&&!looksll" size="mini" type="primary" v-on:click="newTask" >签发</el-button>
        <el-button size="mini" v-on:click="close">取消</el-button>
      </div>
    </div>
    <div class="containercontent" style="margin-top:31px;min-height:100%;padding-top: 0;">
      
      <!-- <div style="border-bottom: 1px solid #b7b7b7;    margin-top: -10px;">
        
      </div> -->
      <!-- 基础信息内容 -->
      <div v-if="nowTab=='basicInfo'">
        <div class="penalrow selectw100">
          <div class="inlineblock verticalmiddle infoitem">
              <div class="inlineblock verticalmiddle">
                名称
              </div>
              <div class="inlineblock verticalmiddle informationItem">
                  <el-input size="mini" placeholder="请输入内容"></el-input>
              </div>
          </div>
          <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              类型
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                <el-select v-model="taskTypeTableDateValue" placeholder="请选择" size="mini">
                    <el-option
                      v-for="item in taskTypeTableDate"
                      :key="item.fieldID"
                      :label="item.fieldName"
                      :value="item.fieldID">
                    </el-option>
                </el-select>
            </div>
          </div>
          <div class="inlineblock verticalmiddle infoitem" >
            <div class="inlineblock verticalmiddle">
              报告字
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                <el-input v-model="taskTypeTableDateValue" size="mini" placeholder="请输入内容" readonly ></el-input>
            </div>
          </div>
        </div>
        <div class="penalrow selectw100">
          <!-- <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              受检单位
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                <el-input size="mini" placeholder="请输入内容"></el-input>
            </div>
          </div> -->
          <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              客户
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                <!-- inspectionUnitTableDate -->
                <el-select v-model="inspectionUnitTableDate2Value" placeholder="请选择" size="mini">
                    <el-option
                      v-for="item in inspectionUnitTableDate2"
                      :key="item.inspectionUnitID"
                      :label="item.inspectionUnitName"
                      :value="item.inspectionUnitID">
                    </el-option>
                </el-select>
            </div>
          </div>
          <div class="inlineblock verticalmiddle infoitem" >
            <div class="inlineblock verticalmiddle">
             编号
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                <el-input size="mini" placeholder="" readonly ></el-input>
            </div>
          </div>
          <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              是否采样
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                <div v-if="bidui">
                    不采样
                </div>
                <el-input v-if="!bidui" size="mini" placeholder="请输入内容"></el-input>
            </div>
          </div>
        </div>
        <div class="penalrow selectw100">
          
          <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              是否签发
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                  <el-input size="mini" placeholder="请输入内容"></el-input>
            </div>
          </div>
          <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              是否报告编制
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                  <el-input size="mini" placeholder="请输入内容"></el-input>
            </div>
          </div>
          <!-- <div class="inlineblock verticalmiddle infoitem">
            <div class="inlineblock verticalmiddle">
              上传任务附件
            </div>
            <div class="inlineblock verticalmiddle informationItem">
                  <el-input size="mini" placeholder=""></el-input>
            </div>
          </div> -->
        </div>
        <br>
        <div class="penalrow selectw100" v-if="isPlan">
          <el-checkbox>默认日任务</el-checkbox>
          <el-checkbox>默认周任务</el-checkbox>
          <el-checkbox>默认月任务</el-checkbox>
          <el-checkbox>默认季度任务</el-checkbox>
        </div>
        <br>
        <div style="padding: 10px 0;border: 1px solid #eee;" v-if="isPlan">
          <div class="penalrow selectw100">
            <div class="inlineblock verticalmiddle infoitem">
                自动下达计划
            </div>
          </div>
          <div class="penalrow selectw100">
            <div class="inlineblock verticalmiddle infoitem">
              <div class="inlineblock verticalmiddle">
                自动下达状态
              </div>
              <div class="inlineblock verticalmiddle informationItem">
                  <el-select v-model="cycStatusValue" placeholder="请选择" size="mini">
                    <el-option
                      v-for="item in cycStatus"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
              </div>
            </div>
          </div>
          <div class="penalrow selectw100" v-if="cycStatusValue=='002'">
            <div class="inlineblock verticalmiddle infoitem">
              <div class="inlineblock verticalmiddle">
                循环模式
              </div>
              <div class="inlineblock verticalmiddle informationItem">
                <el-select v-model="cycleModeValue" placeholder="请选择" size="mini">
                    <el-option
                      v-for="item in cycleMode"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                </el-select>
              </div>
            </div>
            <div class="inlineblock verticalmiddle infoitem">
              <div class="inlineblock verticalmiddle">
                自动下达开始日期
              </div>
              <div class="inlineblock verticalmiddle informationItem" style="    width: calc(100% - 120px);">
                    <el-date-picker
                      type="date"
                      size="mini"
                      placeholder="选择日期">
                    </el-date-picker>
              </div>
            </div>
            <div class="inlineblock verticalmiddle infoitem" >
              <div class="inlineblock verticalmiddle">
                自动下达结束日期
              </div>
              <div class="inlineblock verticalmiddle informationItem" style="    width: calc(100% - 120px);">
                    <el-date-picker
                      type="date"
                      size="mini"
                      placeholder="选择日期">
                    </el-date-picker>
              </div>
            </div>
          </div>
          <div v-if="cycleModeValue=='001'&&cycStatusValue=='002'">
              <div class="penalrow selectw100">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      循环间隔
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                          <!-- <el-input size="mini" placeholder="请输入内容"  ></el-input> -->
                          <el-input-number size="mini" v-model="cycDayNum" style="width:calc(100% - 20px)" :min="1" :max="365"></el-input-number>天
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      任务发放时间
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                          <el-time-select
                            v-model="cycTime"
                            size="mini"
                            :picker-options="{
                              start: '00:00',
                              step: '00:15',
                              end: '23:45'
                            }"
                            placeholder="选择时间">
                          </el-time-select>
                    </div>
                  </div>
              </div>
          </div>
          <div v-if="cycleModeValue=='002'&&cycStatusValue=='002'">
              <div class="penalrow selectw100">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      循环间隔
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                          <!-- <el-input size="mini" placeholder="请输入内容"  ></el-input> -->
                          <el-input-number size="mini" v-model="cycDayNum" style="width:calc(100% - 20px)" :min="1" :max="53"></el-input-number>周
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle" style="width: calc(100%/3*2);">
                    <el-checkbox>星期一</el-checkbox>
                    <el-checkbox>星期二</el-checkbox>
                    <el-checkbox>星期三</el-checkbox>
                    <el-checkbox>星期四</el-checkbox>
                    <el-checkbox>星期五</el-checkbox>
                    <el-checkbox>星期六</el-checkbox>
                    <el-checkbox>星期天</el-checkbox>
                  </div>
              </div>
              <div class="penalrow">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      任务发放时间
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                          <el-time-select
                            v-model="cycTime"
                            size="mini"
                            :picker-options="{
                              start: '00:00',
                              step: '00:15',
                              end: '23:45'
                            }"
                            placeholder="选择时间">
                          </el-time-select>
                    </div>
                  </div>
              </div>
          </div>
          <div v-if="cycleModeValue=='003'&&cycStatusValue=='002'">
              <div class="penalrow selectw100">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      循环间隔
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                          <!-- <el-input size="mini" placeholder="请输入内容"  ></el-input> -->
                          <el-input-number size="mini" v-model="cycDayNum" style="width:calc(100% - 20px)" :min="1" :max="12"></el-input-number>月
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      任务发放时间
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                          <el-time-select
                            v-model="cycTime"
                            size="mini"
                            :picker-options="{
                              start: '00:00',
                              step: '00:15',
                              end: '23:45'
                            }"
                            placeholder="选择时间">
                          </el-time-select>
                    </div>
                  </div>
              </div>
              <div class="penalrow">
                  <span style="width:100px;">选择天</span>
                  <div class="inlineblock verticalmiddle" style="width: 100%;">
                    <el-checkbox>1</el-checkbox>
                    <el-checkbox>2</el-checkbox>
                    <el-checkbox>3</el-checkbox>
                    <el-checkbox>4</el-checkbox>
                    <el-checkbox>5</el-checkbox>
                    <el-checkbox>6</el-checkbox>
                    <el-checkbox>7</el-checkbox>
                    <el-checkbox>8</el-checkbox>
                    <el-checkbox>9</el-checkbox>
                    <el-checkbox>10</el-checkbox>
                    <el-checkbox>11</el-checkbox>
                    <el-checkbox>12</el-checkbox>
                    <el-checkbox>13</el-checkbox>
                    <el-checkbox>14</el-checkbox>
                    <el-checkbox>15</el-checkbox>
                    <el-checkbox>16</el-checkbox>
                    <el-checkbox>17</el-checkbox>
                    <el-checkbox>18</el-checkbox>
                    <el-checkbox>19</el-checkbox>
                    <el-checkbox>20</el-checkbox>
                    <el-checkbox>21</el-checkbox>
                    <el-checkbox>22</el-checkbox>
                    <el-checkbox>23</el-checkbox>
                    <el-checkbox>24</el-checkbox>
                    <el-checkbox>25</el-checkbox>
                    <el-checkbox>26</el-checkbox>
                    <el-checkbox>27</el-checkbox>
                    <el-checkbox>28</el-checkbox>
                  </div>
              </div>
          </div>
        </div>
      </div>
      <!-- 监测方案内容 -->
      <div v-if="nowTab=='monitoringScheme'">
        <div style="padding:0 20px;">
            <div style="padding:10px 0;">
              监测点
              <div style="float:right;margin-top: -4px;">
                  <el-button v-if="!canNotEdit" type="primary" size="mini">批量设置</el-button>
                  <el-button v-if="!canNotEdit" type="primary" size="mini">添加监测点</el-button>
              </div>
            </div>
            <el-table
              :data="monitorPoints"
              style="width: 100%"
              size="mini"
              border
              cell-class-name="monitorPointTableCell"
              highlight-current-row
              @selection-change="handleSelectionChange"
              class='boxShadow'
              >
              <el-table-column
                  type="selection"
                  min-width="38px"
                  fixed
                  >
              </el-table-column>
              <el-table-column
                min-width="80px"
                label="序号"
                fixed>
                  <template slot-scope="scope">
                    {{scope.$index+1}}
                  </template>
              </el-table-column>
              <el-table-column
                property="pointName"
                label="监测点名称"
                min-width="120px"
                fixed
                >
              </el-table-column>
              <el-table-column
                min-width="120px"
                property="monitorArea"
                label="检测区域名称">
              </el-table-column>
              <el-table-column
                property="pointType"
                min-width="100px"
                label="监测点类型"
                >
              </el-table-column>
              <el-table-column
                property="samplingPerson"
                min-width="80px"
                label="采样人"
                >
              </el-table-column>
              <el-table-column
                property="directorOfTheScene"
                min-width="120px"
                label="现场负责人"
                >
              </el-table-column>
              <el-table-column
                property="remarks"
                min-width="100px"
                label="备注"
                >
              </el-table-column>
              <el-table-column
                  label="操作"
                  min-width="180px"
                  fixed="right"
                  >
                  <template slot-scope="scope">
                    <el-button v-if="!canNotEdit" type="text" size="mini">删除</el-button>
                    <el-button v-if="!canNotEdit" type="text" size="mini">设置</el-button>
                  </template>
              </el-table-column>
            </el-table>
        </div>
        <div style="padding:0 20px;">
            <div style="padding:10px 0;">
              采样任务-监测点A
              <div style="float:right;margin-top: -4px;">
                  <el-button v-if="!canNotEdit" type="primary" size="mini">添加采样任务</el-button>
              </div>
            </div>
            <el-table
              :data="sampleTask"
              style="width: 100%"
              size="mini"
              border
              cell-class-name="monitorPointTableCell"
              highlight-current-row
              @selection-change="handleSelectionChange"
              class='boxShadow'
              >
              <el-table-column
                  type="selection"
                  min-width="38px"
                  fixed
                  >
              </el-table-column>
              <el-table-column
                label="序号"
                fixed>
                  <template slot-scope="scope">
                    {{scope.$index+1}}
                  </template>
              </el-table-column>
              <el-table-column
                property="sampleTaskCode"
                label="采样任务编码"
                min-width="120px"
                fixed
                >
              </el-table-column>
              <el-table-column
                min-width="120px"
                property="qcType"
                label="QC类型">
              </el-table-column>
              <el-table-column
                property="samplingRequirements"
                min-width="100px"
                label="采样要求"
                width="132px"
                >
              </el-table-column>
              <el-table-column
                  label="操作"
                  min-width="180px"
                  fixed="right"
                  >
                  <template slot-scope="scope">
                    <el-button v-if="!canNotEdit" type="text" size="mini">删除</el-button>
                    <el-button v-if="!canNotEdit" type="text" size="mini">设置</el-button>
                  </template>
              </el-table-column>
            </el-table>
        </div>
        <div style="padding:0 20px;">
            <div style="padding:10px 0;">
              能力参数-监测点A
              <div style="float:right;margin-top: -4px;">
                  <!-- <el-button v-if="!canNotEdit" type="primary" size="mini">设置容器类型</el-button> -->
                  <el-button v-if="!canNotEdit" type="primary" size="mini">设置分包商</el-button>
                  <el-button v-if="!canNotEdit" type="primary" size="mini">添加能力参数</el-button>
              </div>
            </div>
            <el-table
              :data="testDate"
              style="width: 100%"
              size="mini"
              border
              cell-class-name="monitorPointTableCell"
              highlight-current-row
              @selection-change="handleSelectionChange"
              class='boxShadow'
              >
              <el-table-column
                  type="selection"
                  min-width="38px"
                  fixed
                  >
              </el-table-column>
              <el-table-column
                min-width="38px"
                label="序号"
                fixed>
                  <template slot-scope="scope">
                    {{scope.$index+1}}
                  </template>
              </el-table-column>
              <el-table-column
                property="test"
                label="能力参数名称"
                min-width="120px"
                fixed
                >
              </el-table-column>
              <el-table-column
                min-width="120px"
                property="method"
                label="检测方法">
              </el-table-column>
              <!-- <el-table-column
                property="bottleType"
                min-width="100px"
                label="容器类型"
                width="132px"
                >
              </el-table-column> -->
              <el-table-column
                property="subcontractor"
                min-width="80px"
                label="分包商"
                >
              </el-table-column>
              <el-table-column
                  label="操作"
                  min-width="180px"
                  fixed="right"
                  >
                  <template slot-scope="scope">
                    <el-button v-if="!canNotEdit" type="text" size="mini">删除</el-button>
                    <el-button v-if="!canNotEdit" type="text" size="mini">设置</el-button>
                  </template>
              </el-table-column>
            </el-table>
        </div>
      </div>
      <!-- 检测结果 -->
      <div v-if="nowTab=='jiancejieguo'">
                <div class="penalrow selectw100" style="padding:20px 0;">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      监测点
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="inspectionUnitTableDateValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in inspectionUnitTableDate"
                            :key="item.inspectionUnitID"
                            :label="item.inspectionUnitName"
                            :value="item.inspectionUnitID">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle" style="">
                      能力参数
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="abilityTableDateValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in abilityTableDate"
                            :key="item.abilityID"
                            :label="item.abilityName"
                            :value="item.abilityID">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle" style="">
                      样品状态
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="sampleStatusValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in testBatchStatus"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                </div>
                <el-table
                    :data="taskListArr"
                    style="width: 100%"
                    :height="taskListTableHeight"
                    border
                    size="mini"
                    highlight-current-row
                    cell-class-name="batchtablecell"
                    @current-change="taskTableRowSelect"
                    key="jiancejieguo"
                    >
                    <el-table-column
                      type="selection"
                      width="55">
                    </el-table-column>
                    <el-table-column
                      label="序号"
                      width="49px"
                      fixed
                      >
                      <template slot-scope="scopea">
                        {{scopea.$index+1}}
                      </template>
                    </el-table-column>
                    <!-- <el-table-column
                      fixed
                      prop="taskName"
                      label="检测任务"
                      min-width="90px"
                      >
                    </el-table-column> -->
                    <el-table-column
                      label="监测点"
                      min-width="90px"
                      fixed
                      >
                    </el-table-column>
                    <el-table-column
                      label="能力参数"
                      fixed
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="分析项"
                      fixed
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      fixed
                      label="样品编号"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="QC类型"
                      min-width="90px"
                      >
                    </el-table-column>
                    
                    <el-table-column
                      label="原始记录"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="结果数据"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="修约规则"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="保留位数"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="单位"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="状态"
                      min-width="150px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="采样时间（包含日期）"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="采样人"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="现场负责人"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="重测数"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="重录数"
                      min-width="160px"
                      >
                    </el-table-column>
                    <el-table-column
                      fixed="right"
                      prop="caozuo"
                      label="操作"
                      min-width="160px"
                      >
                      <template slot-scope="scope">
                        <!-- <el-button @click="editTask(scope.row)" type="text" size="small">查看详情</el-button> -->
                        <!-- <el-button type="text" size="small">审核</el-button> -->
                        <el-button type="text" size="small">追溯</el-button>
                        <!-- <el-button type="text" size="small" v-if="scope.row.taskState=='已创建'">任务签发</el-button> -->
                        <!-- <el-button type="text" size="small" v-on:click="newReport">生成报告</el-button> -->
                      </template>
                    </el-table-column>
                </el-table>
      </div>
      <!-- 采样信息 -->
      <div v-if="nowTab=='caiyangxinxi'">
                <div class="penalrow selectw100" style="padding:20px 0;">
                  <div class="inlineblock verticalmiddle infoitem">
                    <div class="inlineblock verticalmiddle">
                      监测点
                    </div>
                    <div class="inlineblock verticalmiddle informationItem">
                        <el-select v-model="inspectionUnitTableDateValue" placeholder="请选择" size="mini">
                          <el-option
                            v-for="item in inspectionUnitTableDate"
                            :key="item.inspectionUnitID"
                            :label="item.inspectionUnitName"
                            :value="item.inspectionUnitID">
                          </el-option>
                        </el-select>
                    </div>
                  </div>
                </div>
                <el-table
                    :data="taskListArr"
                    style="width: 100%"
                    :height="taskListTableHeight"
                    border
                    size="mini"
                    highlight-current-row
                    cell-class-name="batchtablecell"
                    @current-change="taskTableRowSelect"
                    key="caiyangrenwu"
                    >
                    <el-table-column
                      label="序号"
                      width="49px"
                      fixed
                      >
                      <template slot-scope="scopea">
                        {{scopea.$index+1}}
                      </template>
                    </el-table-column>
                    <el-table-column
                      label="监测点"
                      min-width="90px"
                      fixed
                      >
                    </el-table-column>
                    <el-table-column
                      label="采样任务"
                      fixed
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="任务编号"
                      fixed
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      fixed
                      label="采样日期"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      fixed
                      label="接样日期"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="采样人"
                      min-width="90px"
                      >
                    </el-table-column>
                    
                    <el-table-column
                      label="现场负责人"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="接收人"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="样品性状"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="容器类型"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="留样情况"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="瓶数"
                      min-width="90px"
                      >
                    </el-table-column>
                    
                </el-table>
      </div>
      <!-- 流程记录 -->
      <div v-if="nowTab=='shenghejilu'">
            <el-table
                    :data="liuchengjilu"
                    style="width: 100%"
                    :height="taskListTableHeight"
                    border
                    size="mini"
                    highlight-current-row
                    cell-class-name="batchtablecell"
                    @current-change="taskTableRowSelect"
                    key="liuchengjilu"
                    >
                    <el-table-column
                      label="序号"
                      width="49px"
                      fixed
                      >
                      <template slot-scope="scopea">
                        {{scopea.$index+1}}
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="liucheng"
                      label="流程"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="操作时间"
                      prop="shijian"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="操作人"
                      prop="caozuoren"
                      min-width="90px"
                      >
                    </el-table-column>
                    
                </el-table>
      </div>
      <!-- 任务附件 -->
      <div v-if="nowTab=='renwufujian'">
          <div>
            <el-button size="mini" type="primary" >上传附件</el-button>
          </div>
          <el-table
                    :data="renwufujian"
                    style="width: 100%"
                    border
                    size="mini"
                    highlight-current-row
                    cell-class-name="batchtablecell"
                    @current-change="taskTableRowSelect"
                    key="renwufujian"
                    >
                    <el-table-column
                      label="序号"
                      width="49px"
                      fixed
                      >
                      <template slot-scope="scopea">
                        {{scopea.$index+1}}
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="liucheng"
                      label="附件名称"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="附件类型"
                      prop="shijian"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="上传人"
                      prop="caozuoren"
                      min-width="90px"
                      >
                    </el-table-column>
                    <el-table-column
                      label="操作"
                      min-width="90px"
                      >
                      <template slot-scope="scope">
                        <el-button type="text" size="small">删除</el-button>
                        <el-button type="text" size="small">下载</el-button>
                      </template>
                    </el-table-column>
                    
                </el-table>
      </div>
    </div>
  </div>
</template>

<script>

import { mapState } from 'vuex'

export default {
  data () {
    return {
      msg: '',
      nowTab:'basicInfo',
      monitorPoints:[
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      },
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      },
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      },
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      },
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      },
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      },
                      {
                        pointCode:'100001',
                        pointName:'监测点A',
                        monitorArea:'检测区域A',
                        pointType:'管网水',
                        samplingPerson:'采样人A',
                        directorOfTheScene:'现场负责人A',
                        remarks:'备注 - -'
                      }
      ],
      sampleTask:[
                  {
                    sampleTaskCode:'18093001001',
                    qcType:'',
                    samplingRequirements:''
                  },
                  {
                    sampleTaskCode:'18093001002',
                    qcType:'现场平行',
                    samplingRequirements:''
                  }
      ],
      testDate:[
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'分包商a',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'分包商a',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'分包商a',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'',
                  },
                  {
                    test:'氨氮',
                    method:'纳氏试剂法',
                    testMan:'检测员A',
                    bottleType:'容器类型A',
                    subcontractor:'',
                  }
      ],
      cycleModeValue:'',
      cycDayNum:1,
      cycTime:'08:00',
      cycStatusValue:'',
      taskTypeTableDateValue:'',
      taskListArr:[
                    {
                        taskName:'日任务-2018-04-25',
                        taskCode:'10011',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-22'
                    },
                    {
                        taskName:'周任务',
                        taskCode:'10012',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已签发',
                        establishTime:'2018-03-23'
                    },
                    {
                        taskName:'月任务',
                        taskCode:'10013',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已采样',
                        establishTime:'2018-03-24'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10014',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-25'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10015',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-26'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10016',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-27'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10017',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-28'
                    },
                    {
                        taskName:'日任务',
                        taskCode:'10018',
                        taskType:'常规任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-29'
                    },
                    {
                        taskName:'年度比对任务',
                        taskCode:'10019',
                        taskType:'室间比对',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-29'
                    },
                    {
                        taskName:'A用户委托任务',
                        taskCode:'10110',
                        taskType:'委托任务',
                        initiator:'管理员A',
                        taskState:'已创建',
                        establishTime:'2018-03-30'
                    }
      ],
      inspectionUnitTableDateValue:'000',
      inspectionUnitTableDate:[
                                {
                                  inspectionUnitID:'000',
                                  inspectionUnitName:'所有'
                                },
                                {
                                  inspectionUnitID:'001',
                                  inspectionUnitName:'监测点一'
                                },
                                {
                                  inspectionUnitID:'002',
                                  inspectionUnitName:'监测点二'
                                },
                                {
                                  inspectionUnitID:'003',
                                  inspectionUnitName:'监测点三一'
                                },
                                {
                                  inspectionUnitID:'004',
                                  inspectionUnitName:'监测点四'
                                },
                                {
                                  inspectionUnitID:'005',
                                  inspectionUnitName:'监测点一'
                                },
                                {
                                  inspectionUnitID:'006',
                                  inspectionUnitName:'监测点一'
                                },
                                {
                                  inspectionUnitID:'007',
                                  inspectionUnitName:'监测点一'
                                }
      ],
      abilityTableDateValue:'000',
      liuchengjilu:[
                    {
                      liucheng:'任务创建',
                      shijian:'2018-04-01',
                      caozuoren:'操作人A'
                    },
                    {
                      liucheng:'任务签发',
                      shijian:'2018-04-01',
                      caozuoren:'操作人A'
                    }
      ],
      renwufujian:[
                    {
                      liucheng:'附件一',
                      shijian:'附件类型',
                      caozuoren:'上传人A'
                    },
                    {
                      liucheng:'附件二',
                      shijian:'附件类型',
                      caozuoren:'上传人A'
                    }
      ],
      sampleStatusValue:'000',
      inspectionUnitTableDate2Value:'',
    }
  },
  computed:{
    ...mapState(['cycleMode','cycStatus','taskTypeTableDate','abilityTableDate','testBatchStatus','inspectionUnitTableDate2']),
    pointTableHeight(){
      return (((window.innerHeight - 190)*0.3)-40)
    },
    pickSampleTaskHeight(){
      return (((window.innerHeight - 190)*0.3)-40)
    },
    testTableHeight(){
      return (((window.innerHeight - 190)*0.4)-40)
    },
    taskListTableHeight:function(){
        return (window.innerHeight-360)
    },

  },
  mounted(){

  },
  props:['taskDetailShow','type','canNotEdit','showCycleDetail','isPlan','looksll','bidui'],
  methods:{
    newTask:function(){
      this.$parent.taskDetailShow=false;
    },
    close:function(){
      this.$parent.taskDetailShow=false;
    },
    handleSelectionChange(val) {
        this.multipleSelection = val;
    },
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.tabName{
    display: inline-block;
    cursor: pointer;
    padding: 0px 15px;
    border: 1px solid #b7b7b7;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    color: #a9a9a9;
}
.activeTab{
  color: #409eff;
}
.tabPageContent{

}
</style>
